
// Copyright (C) 2015  Frode Roxrud Gill
// See LICENSE file for license

#include "font.h"

#include "xmega/utils/progmem.h"


static PROGMEM_DECLARE(U8, g_FreePixelFont12_alphabet_p[]) = " !\"#%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]_abcdefghijklmnopqrstuvwxyz{}";

static PROGMEM_DECLARE(U8, g_FreePixelFont12_font_p[]) = {
CHAR_SIZE(4,0,0), //[SPACE]

CHAR_SIZE(1,10,0), //!
0b10000000,
0b10000000,
0b10000000,
0b10000000,
0b10000000,
0b10000000,
0b10000000,
0b00000000,
0b10000000,
0b10000000,

CHAR_SIZE(6,3,0), //"
0b11011000,
0b11011000,
0b11011000,

CHAR_SIZE(6,10,0), //#
0b01001000,
0b01001000,
0b11111100,
0b01001000,
0b01001000,
0b01001000,
0b01001000,
0b11111100,
0b01001000,
0b01001000,

CHAR_SIZE(7,11,0), //%
0b01100000,
0b10010000,
0b10010010,
0b01100100,
0b00001000,
0b00010000,
0b00100000,
0b01001100,
0b10010010,
0b00010010,
0b00001100,

CHAR_SIZE(6,10,0), //&
0b00110000,
0b01001000,
0b01001000,
0b00110000,
0b01100000,
0b10010100,
0b10010100,
0b10001000,
0b10001000,
0b01110100,

CHAR_SIZE(2,3,0), //'
0b11000000,
0b11000000,
0b11000000,

CHAR_SIZE(2,11,0), //(
0b01000000,
0b01000000,
0b10000000,
0b10000000,
0b10000000,
0b10000000,
0b10000000,
0b10000000,
0b10000000,
0b01000000,
0b01000000,

CHAR_SIZE(2,11,0), //)
0b10000000,
0b10000000,
0b01000000,
0b01000000,
0b01000000,
0b01000000,
0b01000000,
0b01000000,
0b01000000,
0b10000000,
0b10000000,

CHAR_SIZE(5,5,1), //*
0b00100000,
0b10101000,
0b01110000,
0b10101000,
0b00100000,

CHAR_SIZE(7,7,2), //+
0b00010000,
0b00010000,
0b00010000,
0b11111110,
0b00010000,
0b00010000,
0b00010000,

CHAR_SIZE(3,4,8), //,
0b01100000,
0b01100000,
0b01100000,
0b11000000,

CHAR_SIZE(7,1,5), //-
0b11111110,

CHAR_SIZE(2,2,8), //.
0b11000000,
0b11000000,

CHAR_SIZE(5,10,0), // /
0b00001000,
0b00001000,
0b00010000,
0b00010000,
0b00100000,
0b00100000,
0b01000000,
0b01000000,
0b10000000,
0b10000000,

CHAR_SIZE(6,10,0), //0
0b01111000,
0b10000100,
0b10000100,
0b10001100,
0b10010100,
0b10100100,
0b11000100,
0b10000100,
0b10000100,
0b01111000,

CHAR_SIZE(6,10,0), //1
0b00100000,
0b01100000,
0b10100000,
0b00100000,
0b00100000,
0b00100000,
0b00100000,
0b00100000,
0b00100000,
0b11111000,

CHAR_SIZE(6,10,0), //2
0b01111000,
0b10000100,
0b10000100,
0b00000100,
0b00001000,
0b00010000,
0b00100000,
0b01000000,
0b10000000,
0b11111100,

CHAR_SIZE(6,10,0), //3
0b01111000,
0b10000100,
0b00000100,
0b00001000,
0b00110000,
0b00001000,
0b00000100,
0b00000100,
0b10001000,
0b01110000,

CHAR_SIZE(6,10,0), //4
0b00011000,
0b00101000,
0b00101000,
0b01001000,
0b01001000,
0b10001000,
0b11111100,
0b00001000,
0b00001000,
0b00001000,

CHAR_SIZE(6,10,0), //5
0b11111100,
0b10000000,
0b10000000,
0b10000000,
0b11111000,
0b00000100,
0b00000100,
0b00000100,
0b10000100,
0b01111000,

CHAR_SIZE(6,10,0), //6
0b00111000,
0b01000000,
0b10000000,
0b10000000,
0b10111000,
0b11000100,
0b10000100,
0b10000100,
0b10000100,
0b01111000,

CHAR_SIZE(6,10,0), //7
0b11111100,
0b10000100,
0b00000100,
0b00001000,
0b00001000,
0b00010000,
0b00010000,
0b00100000,
0b00100000,
0b00100000,

CHAR_SIZE(6,10,0), //8
0b01111000,
0b10000100,
0b10000100,
0b01001000,
0b00110000,
0b01001000,
0b10000100,
0b10000100,
0b10000100,
0b01111000,

CHAR_SIZE(6,10,0), //9
0b01111000,
0b10000100,
0b10000100,
0b10000100,
0b10001100,
0b01110100,
0b00000100,
0b00000100,
0b00001000,
0b01110000,

CHAR_SIZE(2,7,3), //:
0b11000000,
0b11000000,
0b00000000,
0b00000000,
0b00000000,
0b11000000,
0b11000000,

CHAR_SIZE(3,9,3), //;
0b01100000,
0b01100000,
0b00000000,
0b00000000,
0b00000000,
0b01100000,
0b01100000,
0b01100000,
0b11000000,

CHAR_SIZE(4,7,2), //<
0b00010000,
0b00100000,
0b01000000,
0b10000000,
0b01000000,
0b00100000,
0b00010000,

CHAR_SIZE(6,3,4), //=
0b11111100,
0b00000000,
0b11111100,

CHAR_SIZE(4,7,2), //>
0b10000000,
0b01000000,
0b00100000,
0b00010000,
0b00100000,
0b01000000,
0b10000000,

CHAR_SIZE(6,10,0), //?
0b01111000,
0b10000100,
0b10000100,
0b00000100,
0b00001000,
0b00010000,
0b00100000,
0b00100000,
0b00000000,
0b00100000,

CHAR_SIZE(7,11,0), //@
0b00111000,
0b01000100,
0b01000010,
0b10011010,
0b10101010,
0b10101010,
0b10101010,
0b10010100,
0b01000000,
0b01000100,
0b00111000,

CHAR_SIZE(6,10,0), //A
0b01111000,
0b10000100,
0b10000100,
0b10000100,
0b10000100,
0b11111100,
0b10000100,
0b10000100,
0b10000100,
0b10000100,

CHAR_SIZE(6,10,0), //B
0b11111000,
0b10000100,
0b10000100,
0b10000100,
0b11111000,
0b10000100,
0b10000100,
0b10000100,
0b10000100,
0b11111000,

CHAR_SIZE(6,10,0), //C
0b00111000,
0b01000100,
0b10000000,
0b10000000,
0b10000000,
0b10000000,
0b10000000,
0b10000000,
0b01000100,
0b00111000,

CHAR_SIZE(6,10,0), //D
0b11110000,
0b10001000,
0b10000100,
0b10000100,
0b10000100,
0b10000100,
0b10000100,
0b10000100,
0b10001000,
0b11110000,

CHAR_SIZE(6,10,0), //E
0b11111100,
0b10000000,
0b10000000,
0b10000000,
0b11111000,
0b10000000,
0b10000000,
0b10000000,
0b10000000,
0b11111100,

CHAR_SIZE(6,10,0), //F
0b11111100,
0b10000000,
0b10000000,
0b10000000,
0b11111000,
0b10000000,
0b10000000,
0b10000000,
0b10000000,
0b10000000,

CHAR_SIZE(6,10,0), //G
0b00111000,
0b01000100,
0b10000000,
0b10000000,
0b10000000,
0b10000000,
0b10001100,
0b10000100,
0b01000100,
0b00111100,

CHAR_SIZE(6,10,0), //H
0b10000100,
0b10000100,
0b10000100,
0b10000100,
0b11111100,
0b10000100,
0b10000100,
0b10000100,
0b10000100,
0b10000100,

CHAR_SIZE(5,10,0), //I
0b11111000,
0b00100000,
0b00100000,
0b00100000,
0b00100000,
0b00100000,
0b00100000,
0b00100000,
0b00100000,
0b11111000,

CHAR_SIZE(6,10,0), //J
0b00111100,
0b00000100,
0b00000100,
0b00000100,
0b00000100,
0b00000100,
0b00000100,
0b00000100,
0b10001000,
0b01110000,

CHAR_SIZE(6,10,0), //K
0b10000100,
0b10001000,
0b10010000,
0b10100000,
0b11000000,
0b11000000,
0b10100000,
0b10010000,
0b10001000,
0b10000100,

CHAR_SIZE(6,10,0), //L
0b10000000,
0b10000000,
0b10000000,
0b10000000,
0b10000000,
0b10000000,
0b10000000,
0b10000000,
0b10000000,
0b11111100,

CHAR_SIZE(7,10,0), //M
0b10000010,
0b10000010,
0b11000110,
0b11000110,
0b10101010,
0b10101010,
0b10010010,
0b10010010,
0b10000010,
0b10000010,

CHAR_SIZE(6,10,0), //N
0b10000100,
0b10000100,
0b11000100,
0b10100100,
0b10100100,
0b10010100,
0b10010100,
0b10001100,
0b10000100,
0b10000100,

CHAR_SIZE(6,10,0), //O
0b00110000,
0b01001000,
0b10000100,
0b10000100,
0b10000100,
0b10000100,
0b10000100,
0b10000100,
0b01001000,
0b00110000,

CHAR_SIZE(6,10,0), //P
0b11111000,
0b10000100,
0b10000100,
0b10000100,
0b10000100,
0b11111000,
0b10000000,
0b10000000,
0b10000000,
0b10000000,

CHAR_SIZE(6,10,0), //Q
0b00110000,
0b01001000,
0b10000100,
0b10000100,
0b10000100,
0b10000100,
0b10000100,
0b10010100,
0b01001000,
0b00110100,

CHAR_SIZE(6,10,0), //R
0b11111000,
0b10000100,
0b10000100,
0b10000100,
0b10000100,
0b11111000,
0b10010000,
0b10001000,
0b10001000,
0b10000100,

CHAR_SIZE(6,10,0), //S
0b01111000,
0b10000100,
0b10000000,
0b10000000,
0b01111000,
0b00000100,
0b00000100,
0b00000100,
0b10000100,
0b01111000,

CHAR_SIZE(7,10,0), //T
0b11111110,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,

CHAR_SIZE(6,10,0), //U
0b10000100,
0b10000100,
0b10000100,
0b10000100,
0b10000100,
0b10000100,
0b10000100,
0b10000100,
0b10000100,
0b01111000,

CHAR_SIZE(7,10,0), //V
0b10000010,
0b10000010,
0b10000010,
0b01000100,
0b01000100,
0b01000100,
0b00101000,
0b00101000,
0b00101000,
0b00010000,

CHAR_SIZE(7,10,0), //W
0b10000010,
0b10000010,
0b10000010,
0b10000010,
0b10010010,
0b10010010,
0b10101010,
0b10101010,
0b01000100,
0b01000100,

CHAR_SIZE(6,10,0), //X
0b10000100,
0b10000100,
0b01001000,
0b01001000,
0b00110000,
0b00110000,
0b01001000,
0b01001000,
0b10000100,
0b10000100,

CHAR_SIZE(7,10,0), //Y
0b10000010,
0b10000010,
0b01000100,
0b01000100,
0b00101000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,

CHAR_SIZE(6,10,0), //Z
0b11111100,
0b00000100,
0b00000100,
0b00001000,
0b00010000,
0b00100000,
0b01000000,
0b10000000,
0b10000000,
0b11111100,

CHAR_SIZE(4,12,0), //[
0b11110000,
0b10000000,
0b10000000,
0b10000000,
0b10000000,
0b10000000,
0b10000000,
0b10000000,
0b10000000,
0b10000000,
0b10000000,
0b11110000,

CHAR_SIZE(4,12,0), //]
0b11110000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b11110000,

CHAR_SIZE(6,1,9), //_
0b11111100,

CHAR_SIZE(6,7,3), //a
0b00111000,
0b01000100,
0b00000100,
0b01111100,
0b10000100,
0b10001100,
0b01110100,

CHAR_SIZE(6,10,0), //b
0b10000000,
0b10000000,
0b10000000,
0b10111000,
0b11000100,
0b10000100,
0b10000100,
0b10000100,
0b10000100,
0b11111000,

CHAR_SIZE(6,7,3), //c
0b01111000,
0b10000100,
0b10000000,
0b10000000,
0b10000000,
0b10000100,
0b01111000,

CHAR_SIZE(6,10,0), //d
0b00000100,
0b00000100,
0b00000100,
0b01111100,
0b10000100,
0b10000100,
0b10000100,
0b10000100,
0b10001100,
0b01110100,

CHAR_SIZE(6,7,3), //e
0b01111000,
0b10000100,
0b10000100,
0b11111100,
0b10000000,
0b10000000,
0b01111000,

CHAR_SIZE(6,10,0), //f
0b00011100,
0b00100000,
0b00100000,
0b11111000,
0b00100000,
0b00100000,
0b00100000,
0b00100000,
0b00100000,
0b00100000,

CHAR_SIZE(6,9,3), //g
0b01110100,
0b10001100,
0b10000100,
0b10000100,
0b10000100,
0b10001100,
0b01110100,
0b00000100,
0b01111000,

CHAR_SIZE(6,10,0), //h
0b10000000,
0b10000000,
0b10000000,
0b10111000,
0b11000100,
0b10000100,
0b10000100,
0b10000100,
0b10000100,
0b10000100,

CHAR_SIZE(5,9,1), //i
0b00100000,
0b00000000,
0b11100000,
0b00100000,
0b00100000,
0b00100000,
0b00100000,
0b00100000,
0b11111000,

CHAR_SIZE(5,11,1), //j
0b00001000,
0b00000000,
0b01111000,
0b00001000,
0b00001000,
0b00001000,
0b00001000,
0b00001000,
0b00001000,
0b10001000,
0b01110000,

CHAR_SIZE(6,10,0), //k
0b10000000,
0b10000000,
0b10000000,
0b10000100,
0b10001000,
0b10010000,
0b11100000,
0b10010000,
0b10001000,
0b10000100,

CHAR_SIZE(5,10,0), //l
0b11000000,
0b01000000,
0b01000000,
0b01000000,
0b01000000,
0b01000000,
0b01000000,
0b01000000,
0b01000000,
0b00111000,

CHAR_SIZE(7,7,3), //m
0b11101100,
0b10010010,
0b10010010,
0b10010010,
0b10010010,
0b10010010,
0b10010010,

CHAR_SIZE(6,7,3), //n
0b10111000,
0b11000100,
0b10000100,
0b10000100,
0b10000100,
0b10000100,
0b10000100,

CHAR_SIZE(6,7,3), //o
0b01111000,
0b10000100,
0b10000100,
0b10000100,
0b10000100,
0b10000100,
0b01111000,

CHAR_SIZE(6,9,3), //p
0b10111000,
0b11000100,
0b10000100,
0b10000100,
0b10000100,
0b10000100,
0b11111000,
0b10000000,
0b10000000,

CHAR_SIZE(6,9,3), //q
0b01111100,
0b10000100,
0b10000100,
0b10000100,
0b10000100,
0b10001100,
0b01110100,
0b00000100,
0b00000100,

CHAR_SIZE(6,7,3), //r
0b10111000,
0b11000100,
0b10000000,
0b10000000,
0b10000000,
0b10000000,
0b10000000,

CHAR_SIZE(6,7,3), //s
0b01111000,
0b10000100,
0b10000000,
0b01111000,
0b00000100,
0b10000100,
0b01111000,

CHAR_SIZE(6,10,0), //t
0b00100000,
0b00100000,
0b00100000,
0b11111100,
0b00100000,
0b00100000,
0b00100000,
0b00100000,
0b00100000,
0b00011100,

CHAR_SIZE(6,7,3), //u
0b10000100,
0b10000100,
0b10000100,
0b10000100,
0b10000100,
0b10001100,
0b01110100,

CHAR_SIZE(6,7,3), //v
0b10000100,
0b10000100,
0b10000100,
0b01001000,
0b01001000,
0b01001000,
0b00110000,

CHAR_SIZE(7,7,3), //w
0b10000010,
0b10000010,
0b10010010,
0b10010010,
0b10101010,
0b01000100,
0b01000100,

CHAR_SIZE(6,7,3), //x
0b10000100,
0b10000100,
0b01001000,
0b00110000,
0b01001000,
0b10000100,
0b10000100,

CHAR_SIZE(6,9,3), //y
0b10000100,
0b10000100,
0b01000100,
0b01001000,
0b00101000,
0b00101000,
0b00010000,
0b00010000,
0b01100000,

CHAR_SIZE(6,7,3), //z
0b11111100,
0b00000100,
0b00001000,
0b00010000,
0b00100000,
0b01000000,
0b11111100,

CHAR_SIZE(5,11,0), //{
0b00011000,
0b00100000,
0b00100000,
0b00100000,
0b00100000,
0b11000000,
0b00100000,
0b00100000,
0b00100000,
0b00100000,
0b00011000,

CHAR_SIZE(5,11,0), //}
0b11000000,
0b00100000,
0b00100000,
0b00100000,
0b00100000,
0b00011000,
0b00100000,
0b00100000,
0b00100000,
0b00100000,
0b11000000
};

FreePixelFont12::FreePixelFont12()
: Font(12, 1, &g_FreePixelFont12_alphabet_p[0], &g_FreePixelFont12_font_p[0])
{
}

FreePixelFont12::~FreePixelFont12()
{
}
